<html>
<head><meta charset="utf-8"><title>wf of self type · t-compiler/wg-nll · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/index.html">t-compiler/wg-nll</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/wf.20of.20self.20type.html">wf of self type</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="136334728"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/wf%20of%20self%20type/near/136334728" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/wf.20of.20self.20type.html#136334728">(Oct 23 2018 at 12:50)</a>:</h4>
<p>So <span class="user-mention" data-user-id="116118">@Matthew Jasper</span>, as suspected, proving the self-type is WF fixes <code>issue-28848.rs</code>, but the more I think about it, it feels like I'm not doing the check in the right place.</p>



<a name="136334735"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/wf%20of%20self%20type/near/136334735" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/wf.20of.20self.20type.html#136334735">(Oct 23 2018 at 12:50)</a>:</h4>
<p>This feels like something we need to enforce for any projection, whether or not a user-supplied type annotation is given.</p>



<a name="136338950"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/wf%20of%20self%20type/near/136338950" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matthew Jasper <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/wf.20of.20self.20type.html#136338950">(Oct 23 2018 at 14:11)</a>:</h4>
<p>Does <code>A::f</code> not record a user type?</p>



<a name="136339746"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/wf%20of%20self%20type/near/136339746" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/wf.20of.20self.20type.html#136339746">(Oct 23 2018 at 14:23)</a>:</h4>
<p>presently it does</p>



<a name="136339748"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/wf%20of%20self%20type/near/136339748" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/wf.20of.20self.20type.html#136339748">(Oct 23 2018 at 14:23)</a>:</h4>
<p>and so the type passes</p>



<a name="136339749"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/wf%20of%20self%20type/near/136339749" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/wf.20of.20self.20type.html#136339749">(Oct 23 2018 at 14:23)</a>:</h4>
<p>but I don't think it should have to</p>



<a name="136339752"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/wf%20of%20self%20type/near/136339752" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/wf.20of.20self.20type.html#136339752">(Oct 23 2018 at 14:23)</a>:</h4>
<p>in order for the test to fail</p>



<a name="136339762"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/wf%20of%20self%20type/near/136339762" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/wf.20of.20self.20type.html#136339762">(Oct 23 2018 at 14:23)</a>:</h4>
<p>I am not going to try to solve this in this PR :)</p>



<a name="136339770"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/wf%20of%20self%20type/near/136339770" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/wf.20of.20self.20type.html#136339770">(Oct 23 2018 at 14:23)</a>:</h4>
<p>I'll just add the test (that is, a variant of <code>issue-28848</code> without explicit annotations)</p>



<a name="136339773"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/wf%20of%20self%20type/near/136339773" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/wf.20of.20self.20type.html#136339773">(Oct 23 2018 at 14:23)</a>:</h4>
<p>and open an issue to refactor this</p>



<a name="136339777"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/wf%20of%20self%20type/near/136339777" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/wf.20of.20self.20type.html#136339777">(Oct 23 2018 at 14:23)</a>:</h4>
<p>or..not :)</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>